DynamicNews.htmlTEXTJyWs…é∂æ©∂æ©ÅÅ∏Û Dynamic News

JavaScript Dynamic News

This stationery page contains JavaScript that display a 'New!' image


Here is an example on how JavaScript can be used to display a NEW! image for contents that are new.

The script in the page handles this automatically so you will not have to keep track and upload an updated page just because a section on the page should be considered old. The magic this script do is that the NEW! image will not be displayed after the date you specify. The downside with using this script is that the image will only be displayed in JavaScript enabled browsers.


Examples:

New until October 2, 2000

New until November 28, 2000

New until January 20, 2001

New until September 15, 2001

New until October 28, 2001

New until January 12, 2002

New until May 20, 2002


How to use:
First, take a look at the HTML page for this file in PageSpinner. You will find the newUntil() script in the HEAD section and see examples on how to call the function to insert the new icon within your text in the BODY section.

Edit this page or copy the newUntil() script and the sample call of the function to the PageSpinner Notebook to get quick access to the script when you want to include it in your own pages.

You can easily change what should be displayed in the page by editing the contents inside the document.write() statement in the newUntil() function. The image used in this page is called new.gif that is located inside the same folder as this example file.

Example source on how to insert a new icon in a page:
Specify year, month (1-12) and the date for the last day the new image should be displayed in the call to the newUntil() function:

New until January 20, 2001 
<SCRIPT LANGUAGE="JavaScript">
<!--
newUntil ( 2001, 1, 20  );
// -->
</SCRIPT>

NOTE: When changing the date in the computer's system to preview a page on a future date, you will most likely need to quit and reopen the browser to get the browser to notice the changes.

  ÇFôKantutjämnad PICT8BAM8BDynamicNews.html MCP (utskrift)TEXTJyWsˇˇˇˇÆM€t `Fô PICT-resurs8BAM8BIM3éFü8ïD®7Ä≤™Ÿ]é≈ ö  UVUUUU    UVUUUU     UVUUUU  "aØ/Q!  UVUUUU)  +  UVUUUU`  k  UVUUUUt  v  UVUUUU}    UVUUUUñ  ó  UVUUUUõ≤  UVUUUU∑  π  UVUUUUø    UVUUUU         UVUUUU  S  ™´†  ¡  UVUUUU≈  Δ  UVUUUU…  ú  ™´È  é  UVUUUUí  î  ò  ô  UVUUUUú  ù  UVUUUU†  ©  UVUUUU≠  ±  UVUUUU¥  –  UVUUUU   ,  UVUUUU 5  8  UVUUUU ;  Y  UVUUUU é  ∂  UVUUUU ø  ¬  UVUUUU ≈  ·  UVUUUU   =  UVUUUU F  H  UVUUUU K  j  UVUUUU ü  Δ  UVUUUU œ  “  UVUUUU ’  Ú  UVUUUU '  O  UVUUUU X  Z  UVUUUU ]  z  UVUUUU Ø  ÷  UVUUUU fl  ·  UVUUUU ‰  ˝  UVUUUU 2  Y  UVUUUU b  e   i  j  UVUUUU m  n  UVUUUU q  |  UVUUUU Ä  Å  UVUUUU Ö  ⁄  UVUUUU fi  Ë  UVUUUU Ì  s  UVUUUU v  í  UVUUUU ñ  †  UVUUUU •  ?  UVUUUUB  °  UVUUUU•  µ  UVUUUU∫  à  UVUUUU–  ⁄  UVUUUUfl    UVUUUU    UVUUUU  ^  UVUUUUa  b  UVUUUUe  ö  UVUUUUû  ü  UVUUUU£    UVUUUU    UVUUUU%  /  UVUUUU3  5  UVUUUU:  π  UVUUUUø  ¡  ≈  Δ  UVUUUU‹ ! ·  UVUUUU  ù  UVUUUU≤  ≥  ∑  π  UVUUUU¿  ¡  UVUUUU»  U  UVUUUUX  Y  UVUUUU\  ë  UVUUUUï  ñ  UVUUUUö    UVUUUU    UVUUUU  (  UVUUUU-  7  G  ™  UVUUUU∞  ≤  ∂  ∑  UVUUUUÕ ! “  UVUUUU÷  ç  UVUUUU¢  £  ß  ©  UVUUUU∞  ±  UVUUUU∏    UVUUUU$  %  )  +  UVUUUU2  3  UVUUUU:  ”  UVUUUU◊  é  UVUUUU£  §  ®  ™  UVUUUU±  ≤  UVUUUUπ  …  Ç>˙à%‘Çstyl*soup6Un*xBMoDENSiZEZġˇ\I‹Äˇˇ\I¨Äˇˇġˇ˛]]|ġˇ\J@